import 'package:flutter/material.dart';
import 'package:xbaistack/widget/blur_widget.dart';
import 'package:xbaistack/widget/number_stepper.dart';

class ExamplePage extends StatefulWidget {
  const ExamplePage({super.key});

  @override
  State<ExamplePage> createState() => _ExamplePageState();
}

class _ExamplePageState extends State<ExamplePage> {
  @override
  void initState() {
    super.initState();
    // WidgetsBinding.instance.addPostFrameCallback((_) => _showFloatingWindow());
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("DM's Blur Gallery"),
        // foregroundColor: Colors.blue,
        backgroundColor: const Color.fromRGBO(0, 0, 0, 0),
        flexibleSpace: BlurWidget(child: SizedBox.expand()),
      ),
      extendBodyBehindAppBar: true,
      body: ListView(
        children: [
          Padding(
            padding: const EdgeInsets.all(20),
            child: FilledButton(onPressed: () {}, child: Text("FilledButton")),
          ),
          Center(
            child: SizedBox(
              child: Container(
                color: Colors.red,
                width: 150,
                child: Text('data3fasd131'),
              ),
            ),
          ),
          
          Center(
            child: NumberStepper(
              minValue: 1,
              maxValue: 20000,
              padding: 10,
              width: 150,
              onChanged: (value) {
                print(value);
              },
            ),
          ),
          // Image.network(
          //   'https://workyd.com/image/avator.png',
          //   fit: BoxFit.cover,
          //   width: 200,
          // ),
          // Image.network(
          //   'https://workyd.com/image/avator.png',
          //   fit: BoxFit.cover,
          //   width: 200,
          // ),
          Padding(
            padding: const EdgeInsets.all(20),
            child: FilledButton(onPressed: () {}, child: Text("FilledButton")),
          ),
        ],
      ),
    );
  }
}
